//package com.min.redis.application.job;
//
//import com.min.redis.api.manager.RankManager;
//import com.xxl.job.core.handler.annotation.XxlJob;
//import lombok.AllArgsConstructor;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.util.Collections;
//import java.util.Random;
//
//@Component
//@AllArgsConstructor
//public class SongRankJob {
//
//    private final RankManager rankManager;
//
//    @XxlJob("addSongPlay")
//    public void addSongPlayTimes(){
//        String[] songs = new String[]{"Bad Romance","Poker Face","Million Reasons","Angle Down","Diamond Heart","Applause",
//                "Born This Way","Shallow","Just Dance","Monster","Enigma","Perfect Illusion","The Cure"};
//        Random random = new Random();
//        for (int i = 0; i < 100; i++) {
//            rankManager.addScore(songs[random.nextInt(songs.length)]);
//        }
//    }
//}
